Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Algorithmic Puzzles</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Algorithmic_Puzzles"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Algorithmic_Puzzles rootpage-Algorithmic_Puzzles skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><i>Algorithmic Puzzles</i></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><p class="mw-empty-elt">
</p>
<style data-mw-deduplicate="TemplateStyles:r1295905060">
/* start https://en.wikipedia.org/ */


.mw-parser-output .infobox-subbox{padding:0;border:none;margin:-3px;width:auto;min-width:100%;font-size:100%;clear:none;float:none;background-color:transparent}.mw-parser-output .infobox-3cols-child{margin:auto}.mw-parser-output .infobox .navbar{font-size:100%}@media screen{html.skin-theme-clientpref-night .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .infobox-full-data:not(.notheme)>div:not(.notheme)[style]{background:#1f1f23!important;color:#f8f9fa}}@media(min-width:640px){body.skin--responsive .mw-parser-output .infobox-table{display:table!important}body.skin--responsive .mw-parser-output .infobox-table>caption{display:table-caption!important}body.skin--responsive .mw-parser-output .infobox-table>tbody{display:table-row-group}body.skin--responsive .mw-parser-output .infobox-table th,body.skin--responsive .mw-parser-output .infobox-table td{padding-left:inherit;padding-right:inherit}}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1287740527">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ib-book .infobox-title{font-style:italic;padding-bottom:0.2em}.mw-parser-output .ib-book .Z3988{display:none}.mw-parser-output .ib-book .infobox-below{border-top:#aaa 1px solid}


/* end https://en.wikipedia.org/ */
</style><table class="infobox ib-book vcard"><caption class="infobox-title">Algorithmic Puzzles </caption><tbody><tr><td colspan="2" class="infobox-image"><div class="infobox-caption">First edition</div></td></tr><tr><th scope="row" class="infobox-label">Author</th><td class="infobox-data">Anany Levitin, Maria Levitin</td></tr><tr><th scope="row" class="infobox-label">Publisher</th><td class="infobox-data"><a href="Oxford_University_Press" title="Oxford University Press">Oxford University Press</a></td></tr><tr><th scope="row" class="infobox-label"><div style="display: inline-block; line-height: 1.2em; padding: .1em 0;">Publication date</div></th><td class="infobox-data">2011</td></tr></tbody></table>
<p><i><b>Algorithmic Puzzles</b></i> is a book of puzzles based on <a href="Computational_thinking" title="Computational thinking">computational thinking</a>. It was written by computer scientists Anany and Maria Levitin, and published in 2011 by <a href="Oxford_University_Press" title="Oxford University Press">Oxford University Press</a>.
</p>
<div class="mw-heading mw-heading2"><h2 id="Topics">Topics</h2></div>
<p>The book begins with a "tutorial" introducing classical algorithm design techniques including <a href="Backtracking" title="Backtracking">backtracking</a>, <a href="Divide-and-conquer_algorithm" title="Divide-and-conquer algorithm">divide-and-conquer algorithms</a>, and <a href="Dynamic_programming" title="Dynamic programming">dynamic programming</a>, methods for the <a href="Analysis_of_algorithms" title="Analysis of algorithms">analysis of algorithms</a>, and their application in example puzzles.<sup id="cite_ref-gasarch_1-0" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-rosebrock_2-0" class="reference"><a href="#cite_note-rosebrock-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> The puzzles themselves are grouped into three sets of 50 puzzles, in increasing order of difficulty. A final two chapters provide brief hints and more detailed solutions to the puzzles,<sup id="cite_ref-rosebrock_2-1" class="reference"><a href="#cite_note-rosebrock-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup> with the solutions forming the majority of pages of the book.<sup id="cite_ref-griffiths_3-0" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p><p>Some of the puzzles are well known classics, some are variations of known puzzles making them more algorithmic, and some are new.<sup id="cite_ref-narayanan_4-0" class="reference"><a href="#cite_note-narayanan-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> They include:
</p>
<ul><li>Puzzles involving chessboards, including the <a href="Eight_queens_puzzle" title="Eight queens puzzle">eight queens puzzle</a>, <a href="Knight's_tour" title="Knight's tour">knight's tours</a>, and the <a href="Mutilated_chessboard_problem" title="Mutilated chessboard problem">mutilated chessboard problem</a><sup id="cite_ref-gasarch_1-1" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-griffiths_3-1" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-narayanan_4-1" class="reference"><a href="#cite_note-narayanan-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li><a href="Balance_puzzle" title="Balance puzzle">Balance puzzles</a><sup id="cite_ref-griffiths_3-2" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup></li>
<li><a href="River_crossing_puzzle" title="River crossing puzzle">River crossing puzzles</a><sup id="cite_ref-griffiths_3-3" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup><sup id="cite_ref-narayanan_4-2" class="reference"><a href="#cite_note-narayanan-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li>The <a href="Tower_of_Hanoi" title="Tower of Hanoi">Tower of Hanoi</a><sup id="cite_ref-narayanan_4-3" class="reference"><a href="#cite_note-narayanan-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li>
<li>Finding the missing element in a <a href="Streaming_algorithm" title="Streaming algorithm">data stream</a><sup id="cite_ref-gasarch_1-2" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></li>
<li>The <a href="Geometric_median" title="Geometric median">geometric median</a> problem for <a href="Manhattan_distance" class="mw-redirect" title="Manhattan distance">Manhattan distance</a><sup id="cite_ref-gasarch_1-3" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Audience_and_reception">Audience and reception</h2></div>
<p>The puzzles in the book cover a wide range of difficulty, and in general do not require more than a high school level of mathematical background.<sup id="cite_ref-griffiths_3-4" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
<a href="William_Gasarch" title="William Gasarch">William Gasarch</a> notes that grouping the puzzles only by their difficulty and not by their themes is actually an advantage, as it provides readers with fewer clues about their solutions.<sup id="cite_ref-gasarch_1-4" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>Reviewer Narayanan Narayanan recommends the book to any puzzle aficionado, or to anyone who wants to develop their powers of algorithmic thinking.<sup id="cite_ref-narayanan_4-4" class="reference"><a href="#cite_note-narayanan-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> Reviewer Martin Griffiths suggests another group of readers, schoolteachers and university instructors in search of examples to illustrate the power of algorithmic thinking.<sup id="cite_ref-griffiths_3-5" class="reference"><a href="#cite_note-griffiths-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
Gasarch recommends the book to any computer scientist, evaluating it as "a delight".<sup id="cite_ref-gasarch_1-5" class="reference"><a href="#cite_note-gasarch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-gasarch-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-gasarch_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-gasarch_1-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-gasarch_1-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-gasarch_1-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-gasarch_1-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-gasarch_1-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFGasarch2013" class="citation cs2"><a href="William_Gasarch" title="William Gasarch">Gasarch, William</a> (December 2013), <a rel="nofollow" class="external text" href="https://www.cs.umd.edu/~gasarch/bookrev/44-4.pdf">"Review of <i>Algorithmic Puzzles</i>"</a> <span class="cs1-format">(PDF)</span>, <i>ACM SIGACT News</i>, <b>44</b> (4): <span class="nowrap">47–</span>48, <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1145%2F2556663.2556674">10.1145/2556663.2556674</a></cite></span>
</li>
<li id="cite_note-rosebrock-2"><span class="mw-cite-backlink">^ <a href="#cite_ref-rosebrock_2-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-rosebrock_2-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFRosebrock" class="citation cs2">Rosebrock, Stephan, "Review of <i>Algorithmic Puzzles</i>", <i>zbMATH</i>, <a href="Zbl_(identifier)" class="mw-redirect" title="Zbl (identifier)">Zbl</a>&nbsp;<a rel="nofollow" class="external text" href="https://zbmath.org/?format=complete&amp;q=an:1233.00005">1233.00005</a></cite></span>
</li>
<li id="cite_note-griffiths-3"><span class="mw-cite-backlink">^ <a href="#cite_ref-griffiths_3-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-griffiths_3-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-griffiths_3-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-griffiths_3-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-griffiths_3-4"><sup><i><b>e</b></i></sup></a> <a href="#cite_ref-griffiths_3-5"><sup><i><b>f</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFGriffiths2014" class="citation cs2">Griffiths, Martin (March 2014), "Review of <i>Algorithmic Puzzles</i>", <i>The Mathematical Gazette</i>, <b>98</b> (541): 188, <a href="Doi_(identifier)" class="mw-redirect" title="Doi (identifier)">doi</a>:<a rel="nofollow" class="external text" href="https://doi.org/10.1017%2FS0025557200001182">10.1017/S0025557200001182</a>, <a href="JSTOR_(identifier)" class="mw-redirect" title="JSTOR (identifier)">JSTOR</a>&nbsp;<a rel="nofollow" class="external text" href="https://www.jstor.org/stable/24496640">24496640</a></cite></span>
</li>
<li id="cite_note-narayanan-4"><span class="mw-cite-backlink">^ <a href="#cite_ref-narayanan_4-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-narayanan_4-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-narayanan_4-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-narayanan_4-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-narayanan_4-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFNarayanan2012" class="citation cs2">Narayanan, Narayanan (2012), "Review of <i>Algorithmic Puzzles</i>", <i>Mathematical Reviews</i>, <a href="MR_(identifier)" class="mw-redirect" title="MR (identifier)">MR</a>&nbsp;<a rel="nofollow" class="external text" href="https://mathscinet.ams.org/mathscinet-getitem?mr=2866446">2866446</a></cite></span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-03-28" href="https://en.wikipedia.org/wiki/?title=Algorithmic_Puzzles&amp;oldid=1282780285">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>